﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
// Copyright (C) 2022 kingerrobot
// 版权所有。 
//
// 文件名：CuringCallMaterialService
// 文件功能描述：
//
// 创建者：名字 (zzl)
// 时间：2022/1/19 9:29:39
//
// 修改人：
// 时间：
// 修改说明：
// 版本：V1.0.0
//----------------------------------------------------------------*/
#endregion

/// <summary>
/// 硫化请料服务
/// </summary>
public interface ICuringCallMaterialService
{

    /// <summary>
    /// 请料创建出库单
    /// </summary>
    /// <param name="param"></param>
    /// <param name="codeOutOrderType">出库订单类型</param>
    /// <returns></returns>
    (List<CuringCallMaterialResult>, string, int) CreateCallMaterialOrder(List<CuringCallMaterialParam> param, 
        int codeOutOrderType = (int)EnumCodeOutOrderType.RequesMaterial);
}
/// <summary>
/// 硫化请料入参
/// </summary>
public class CuringCallMaterialParam
{
    /// <summary>
    /// 设备ID
    /// </summary>
    public long EquipId { get; set; }
    /// <summary>
    /// 设备位置ID
    /// </summary>
    public long LocId { get; set; }
    /// <summary>
    /// 生产请料 ID
    /// </summary>
    public string MidId { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string MachineNo { get; set; }
    /// <summary>
    /// 作业指示编号
    /// </summary>
    public string Serno { get; set; }
    /// <summary>
    /// 左右模(左 2，右 1)
    /// </summary>
    public int MachineModel { get; set; }
    /// <summary>
    /// 左右模(左 L，右 R)
    /// </summary>
    public string ModeRL { get; set; }
    /// <summary>
    /// Spec码
    /// </summary>
    public string Spec { get; set; }
    /// <summary>
    /// 物料规格
    /// </summary>
    public string MaterialCode { get; set; }
    /// <summary>
    /// 旋转角度
    /// </summary>
    public decimal Angle { get; set; }
    /// <summary>
    /// 请求数量
    /// </summary>
    public decimal? InvQty { get; set; } = 1;
    /// <summary>
    /// 是否硫化机清料：1 是；0 Mes 中间表请料；2、流水号请料
    /// </summary>
    public int CallSign { get; set; }
    /// <summary>
    /// 请料流水号
    /// </summary>
    public int CallNo { get; set; }
    /// <summary>
    /// MES 订单编号
    /// </summary>
    public string OrderNo { get; set; }
    /// <summary>
    /// 订单优先级
    /// </summary>
    public int OrderPriority { get; set; }
    /// <summary>
    /// 起始货位
    /// </summary>
    public long? StartLoc { get; set; }

    /// <summary>
    /// 可请料数量
    /// </summary>
    public int? CanQty { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

/// <summary>
/// 硫化请料返回参数
/// </summary>
public class CuringCallMaterialResult
{
    public string Id { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string EquipNo { get; set; }
    /// <summary>
    /// 硫化机左右模
    /// </summary>
    public int EquipModel { get; set; }
    /// <summary>
    /// 订单从表ID
    /// </summary>
    public long SummaryId { get; set; }
}